package com.qf.day08;

import com.qf.day06.Dog;

/**
 * 静态方法的参数设置为接口类型
 */
public class MyUtils extends Bird{
    public static  void method01(Myinterface myinterface){
        myinterface.test1(10);
        myinterface.test2();
    }

//    public static void main(String[] args) {
////        MyUtils.method01();
//    }

    /**
     * 飞行员训练
     * @param flyable  需要传入的对象是实现了Flyable的对象
     */
    public static void trainFlyer(Flyable flyable){
        for (int i = 0; i < 5; i++) {
            flyable.fly();
            flyable.fireable();
            flyable.swim();

        }
    }

    public static void trainFire(Flyable fireable){

    }

    public static void main(String[] args) {
        Bird bird = new Bird();
        trainFlyer(bird);


        Dog dog = new Dog();
        trainFlyer(dog);

    }
    public static void aa(Flyable flyable){
        flyable.swim();

    }
}
